import request from '/@/utils/request'
// 查询IP封锁列表
export function listFilterBlock(query:object) {
  return request({
    url: '/api/v1/ipfilter/filterBlock/list',
    method: 'get',
    params: query
  })
}
// 查询IP封锁详细
export function getFilterBlock(id:number) {
  return request({
    url: '/api/v1/ipfilter/filterBlock/get',
    method: 'get',
    params: {
      id: id.toString()
    }
  })
}
// 新增IP封锁
export function addFilterBlock(data:object) {
  return request({
    url: '/api/v1/ipfilter/filterBlock/add',
    method: 'post',
    data: data
  })
}
// 修改IP封锁
export function updateFilterBlock(data:object) {
  return request({
    url: '/api/v1/ipfilter/filterBlock/edit',
    method: 'put',
    data: data
  })
}
// 删除IP封锁
export function delFilterBlock(ids:number[]) {
  return request({
    url: '/api/v1/ipfilter/filterBlock/delete',
    method: 'delete',
    data:{
      ids:ids
    }
  })
}
